package controller.data.readDocumentation;

import config.Config;

public class ReadDocumentationRequest {
	private String category;
	private String javaelement;
	private int skipDocuments;

	public ReadDocumentationRequest(String category, String javaelement) {
		super();
		setCategory(category);
		setJavaelement(javaelement);
		setSkipDocuments(0);
	}

	public ReadDocumentationRequest(String category, String javaelement,
			int skipDocuments) {
		super();
		setCategory(category);
		setJavaelement(javaelement);
		setSkipDocuments(skipDocuments);
	}

	public int getSkipDocuments() {
		return skipDocuments;
	}

	private void setSkipDocuments(int skipDocuments) {
		this.skipDocuments = skipDocuments;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getJavaelement() {
		return javaelement;
	}

	public void setJavaelement(String javaelement) {
		this.javaelement = javaelement;
	}

	public void nextDocumentationPage() {
		skipDocuments += Config.SKIP_DOCUMENTS;
	}

	public void previousDocumentationPage() {
		if (skipDocuments >= Config.SKIP_DOCUMENTS) {
			skipDocuments -= Config.SKIP_DOCUMENTS;
		}
	}

}
